1. Field of the Invention
The present invention relates to a coding apparatus for performing coding by adaptively switching two or more coding systems.
2. Related Background Art
Conventionally, various coding systems have been proposed in order to reduce the quantity of transmission data in digitally transmitting image information.
One of the proposed coding systems is to perform coding by switching intraframe coding and interframe coding.
The intraframe compression is a system of reducing the quantity of information by using the characteristic of an image that neighboring pixels have similar brightnesses and similar colors.
In the bulk of an actual image, such as a portion of sky or wall of an image, brightnesses and colors respectively continue at substantially the same levels, and so compression of about 1/5 to 1/10 is possible even by the use of the intraframe compression alone.
The interframe compression is a system of obtaining images from corrected information alone by using analogous images.
In normal dynamic images, patterns of adjacent frames are similar to each other although there are some movements or deformations. By taking advantage of this characteristic, the similarity (e.g., movement, color, and brightness) between a frame to be compression-coded and its adjacent frame is calculated. On the basis of this calculation, a "predicted value," i.e., the value of a frame which is more similar to the "frame to be coded" than the "adjacent frame" is calculated.
Subsequently, only information indicating the difference between the frame to be coded and the "predicted value" is coded (recorded and transmitted). For this reason, the quantity of data (the quantity of correction) is reduced.
That is, when a person moves to the right in a dynamic image in which only the person is shown, pixels at which the person exists in the immediately preceding frame, including correction information of the movement, correspond to the predicted value, and a value obtained by subtracting the predicted value from the whole pixels which have moved to the right corresponds to the difference.
It is generally known that when compression is performed by the interframe processing in conventional coding apparatuses, if an error occurs in a transmission path, this error propagates. Therefore, the intraframe processing is automatically performed after the interframe processing is performed a predetermined number of times.
The quantity of data per frame of a coded image is approximately 16K to 25K bytes, in the intraframe processing, and approximately 7K to 10K bytes, in the interframe processing.
That is, the quantity of generated data in the intraframe processing is generally larger than that in the interframe processing.
When the intraframe coding is performed periodically, therefore, the quantity of generated data abruptly increases if quantization is performed by using the immediately preceding quantization step (the quantization step used in the interframe coding), and this poses a problem of a transmission rate.
To reduce the quantity of generated data, however, if coding is performed while changing the quantization step, another problem of degradation in image quality arises.
In addition, when compression coding is performed by using DCT (Discrete Cosine Transform), no bias occurs in generated information with respect to a DC (direct current) component in the intraframe compression processing. This makes it impossible to reduce the quantity of information by the use of entropy coding (in which the quantity of information generated is reduced by assigning a short codeword to information which is generated at a high probability and a long codeword to information which is generated at a low probability).
The above problems take place in coding apparatuses (having at least a predictive coding mode) for performing coding by adaptively switching a plurality of coding modes.
Under these circumstances, the present invention is directed to a coding apparatus which prevents degradation in signals by eliminating the above conventional problems.